#ifndef __PARK_LED_H_
#define __PARK_LED_H_

#define LED_128X16_TYPE 0
#define LED_98X12_TYPE 1
#define LED_48X12_TYPE 2
#define LED_51X12_TYPE 3
#define LED_64X32_TYPE 4

typedef struct led_proto_head_s
{
	char head[4];
	char to_addr;
	char from_addr;
	char cmd_id[2];
	char packet_id[2];
	char packet_len[4];
	char frame_cnt;
	char frame_no;
	char frame_len[4];
	char frame_data[0];
}S_LED_PROTO_HEAD, *PS_LED_PROTO_HEAD;

typedef struct led_proto_frame_s
{
	char frame_cnt;
	char frame_no;
	char frame_len[4];
	char frame_area_cnt;
	char frame_date[18];
	char area_data[0];
}S_LED_PROTO_FRAME, *PS_LED_PROTO_FRAME;

typedef struct led_proto_area_head_s
{
	char area_no;
	char area_len[4];
	char area_type;
	char area_start_x[2];
	char area_start_y[2];
	char area_end_x[2];
	char area_end_y[2];
	char data[0];
}S_LED_PROTO_AREA_HEAD, *PS_LED_PROTO_AREA_HEAD;


#define FONT_COLOR_RED 0x1
#define FONT_COLOR_GREEN 0x2
#define FONT_COLOR_BLUE 0x4

#define FONT_SHAPE_32X 32
#define FONT_SHAPE_16X 16
#define FONT_SHAPE_AUTO 0xff


typedef struct led_proto_code_s
{
	char font_color;
	char font_type[2];
	char enter_type;
	char quit_type;
	char show_time;
	char stay_time;
	char font_shape;
	char code_len[4];
	char code[0];
}S_LED_PROTO_CODE, *PS_LED_PROTO_CODE;

typedef struct led_proto_packet_end_s
{
	char crc[2];
	char end[2];  // 0x0d 0x0a
}S_LED_PROTO_PACKET_END, *PS_LED_PROTO_PACKET_END;


typedef struct led_attr_s
{
	short length;
	short heigth;
	int area_num;
	int show_num;
}S_LED_ATTR, *PS_LED_ATTR;

#define LED_PORT 10000
#define UNIT_SIZE 8;


int park_led_display(PS_LED pstLed);

#endif
